package cn.jeeweb.web.modules.equipment.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.flag.ObjectMark;
import cn.jeeweb.common.mvc.entity.DataEntity;
import cn.xjzn.framework_Core.ControlType;
import cn.xjzn.framework_Core.ModuleServe;
import cn.xjzn.framework_Core.StaticControl;
import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;

/**
 * Created by zll on 2019/11/9
 */
public class EqsMaintenancePlan extends DataEntity<String> implements ObjectMark {

  @TableField(value = "code")
  @Excel(name = "计划编号", orderNum = "1", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "code",codeConfig = "MTPAUTOCODE",labelText="计划编号",displayPosition =1)
  private String code;
  @TableField(value = "name")
  @Excel(name = "计划名称", orderNum = "2", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "name",labelText="计划名称",displayPosition =2)
  private String name;

  @TableField(value = "equipmentId")
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "id",aliasName = "equipmentId",labelText="设备资产id",ownerPropertyName = "eqsEquipment",isReference = 1,referenceModuleId =ModuleServe.equipmentModule,displayPosition =3)
  private String equipmentId;

  @TableField(value = "freq_unit")
  @Excel(name = "频次", orderNum = "3", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "freqUnit",labelText="频次",displayPosition =4, controlType = ControlType.DICTSELECTCONTROL,dictCode = "MaintenanceFreq")
  private String freqUnit;
  @TableField(value = "maintenance_type")
  @Excel(name = "保养类型", orderNum = "4", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "maintenanceType",labelText="保养类型",displayPosition =5, controlType = ControlType.DICTSELECTCONTROL,dictCode = "MaintenanceType")
  private String maintenanceType;
  @TableField(value = "from_date")
  @Excel(name = "保养开始日期", orderNum = "5", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "fromDate",labelText="保养开始日期",displayPosition =6, staticControl = StaticControl.DATESTATICCONTROL)
  private Date fromDate;

  @TableField(value = "last_warning_days")
  @Excel(name = "提前预警天数", orderNum = "6", width = 20.0D)
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "lastWarningDays",labelText="提前预警天数",displayPosition =7)
  private Integer lastWarningDays;

  @TableField(value = "checkHistoryId")
  @UiPropertyField(moduleId = ModuleServe.eqsMaintenancePlanModule,propertyName = "id",aliasName = "checkHistoryId",labelText="点检记录id",ownerPropertyName = "eqsMaintenanceCheckHistory",isReference = 1,referenceModuleId =ModuleServe.eqsMaintenanceCheckHistoryModule,displayPosition =3)
  private String checkHistoryId;

  @TableField(exist = false)
  private EqsMaintenanceCheckHistory eqsMaintenanceCheckHistory;

  @TableField(exist = false)
  private EqsEquipment eqsEquipment;


  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getEquipmentId() {
    return equipmentId;
  }

  public void setEquipmentId(String equipmentId) {
    this.equipmentId = equipmentId;
  }

  public String getFreqUnit() {
    return freqUnit;
  }

  public void setFreqUnit(String freqUnit) {
    this.freqUnit = freqUnit;
  }

  public String getMaintenanceType() {
    return maintenanceType;
  }

  public void setMaintenanceType(String maintenanceType) {
    this.maintenanceType = maintenanceType;
  }

  public EqsEquipment getEqsEquipment() {
    return eqsEquipment;
  }

  public void setEqsEquipment(EqsEquipment eqsEquipment) {
    this.eqsEquipment = eqsEquipment;
  }

  public Date getFromDate() {
    return fromDate;
  }

  public void setFromDate(Date fromDate) {
    this.fromDate = fromDate;
  }

  public Integer getLastWarningDays() {
    return lastWarningDays;
  }

  public void setLastWarningDays(Integer lastWarningDays) {
    this.lastWarningDays = lastWarningDays;
  }

  public String getCheckHistoryId() {
    return checkHistoryId;
  }

  public void setCheckHistoryId(String checkHistoryId) {
    this.checkHistoryId = checkHistoryId;
  }

  public EqsMaintenanceCheckHistory getEqsMaintenanceCheckHistory() {
    return eqsMaintenanceCheckHistory;
  }

  public void setEqsMaintenanceCheckHistory(EqsMaintenanceCheckHistory eqsMaintenanceCheckHistory) {
    this.eqsMaintenanceCheckHistory = eqsMaintenanceCheckHistory;
  }
}
